import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';

import '../styles/BackBox.scss';

import back0 from '../assets/back-000.png';

class BackBox extends Component {
    back() {
        //返回上一个路由
        this.props.history.go(-1);
    }
    render() {
        return (
            <div className='BackBox' onClick={() => { this.back() }}>
                <div className='back' ><img src={back0} alt="" /></div>
            </div>
        );
    }
}

export default withRouter(BackBox);